﻿using System.Diagnostics;
using Debug = UnityEngine.Debug;

public enum DebugType
{
    Print,
    Warning,
    Error
}
public class DebugTools
{
    /// <summary>
    /// Debug帮助类 使用Debug_Enable宏定义来优化Debug
    /// </summary>
    /// <param name="message">信息</param>
    /// <param name="coloc">自定义颜色，仅在Type为print模式下使用，16进制格式不用加#</param>
    /// <param name="debugType">Debug类型</param>
    //[Conditional("Debug_Enable")]
    public static void Print(object message, DebugType debugType = DebugType.Print, string coloc = "ffffff")
    {
        switch (debugType)
        {
            case DebugType.Print:
                Debug.Log($"<color=#{coloc}>[Ding]{message}</color>");
                break;
            case DebugType.Warning:
                Debug.LogWarning("[Ding] " + message);
                break;
            case DebugType.Error:
                Debug.LogError("[Ding] " + message);
                break;
        }
    }
}
